package com.nlscan.ncomgateway.core.common

import com.nlscan.ble.NlsBleManager

/**
 * <pre>
 *  author: lin.qing
 *  time  : 2023/3/29
 *  desc  :
 * </pre>
 */
object AppConfig {

    const val DEFAULT_CONNECT_CODE_TYPE = NlsBleManager.BARCODE_TYPE_2D_DM

    const val DEFAULT_OUTPUT_MODE = AppState.OUTPUT_MODE_BROADCAST

    /**
     * -- 2023-07-05 [bugFix] MT90 Android7 将 nlscan.action.SCANNER_RESULT 设置为 protect，非系统应用无法发送该广播，
     * 具体见：https://blog.csdn.net/qq_36017059/article/details/110474960
     */
    //const val DEFAULT_BROADCAST_OUTPUT_ACTION = "nlscan.action.SCANNER_RESULT"
    const val DEFAULT_BROADCAST_OUTPUT_ACTION = "com.nlscan.action.SCANNER_RESULT"

    /**
     * 与PDA保持一致，默认value为xx1
     */
    const val DEFAULT_BROADCAST_OUTPUT_EXTRA_RESULT = "SCAN_BARCODE1"

    const val DEFAULT_BROADCAST_OUTPUT_EXTRA_DEVICE_NAME = "DEVICE_NAME"
    const val DEFAULT_BROADCAST_OUTPUT_EXTRA_ADDRESS = "DEVICE_ADDRESS"
    const val DEFAULT_BROADCAST_OUTPUT_EXTRA_SERIAL_NUMBER = "SERIAL_NUMBER"
    const val DEFAULT_BROADCAST_OUTPUT_EXTRA_BARCODE_TYPE = "SCAN_BARCODE_TYPE"
    const val DEFAULT_BROADCAST_OUTPUT_EXTRA_BARCODE_TYPE_NAME = "SCAN_BARCODE_TYPE_NAME"

    const val DEFAULT_IP_OUTPUT_PROTOCOL = "TCP"

    //    const val DEFAULT_IP_OUTPUT_ADDRESS = "0.0.0.0"
    //TCP和UDP的默认端口，HTTP不使用
    const val DEFAULT_IP_OUTPUT_PORT = "8080"
    const val DEFAULT_HTTP_OUTPUT_REQUEST_METHOD = AppState.HTTP_REQUEST_METHOD_GET
    const val DEFAULT_UDP_LOCAL_PORT= 45054

    const val DEFAULT_DATA_FORMAT_FIELD_BARCODE = "SCAN_BARCODE"
    const val DEFAULT_DATA_FORMAT_FIELD_DEVICE_NAME = "DEVICE_NAME"
    const val DEFAULT_DATA_FORMAT_FIELD_DEVICE_ADDRESS = "DEVICE_ADDRESS"
    const val DEFAULT_DATA_FORMAT_FIELD_SERIAL_NUMBER = "SERIAL_NUMBER"
    const val DEFAULT_DATA_FORMAT_FIELD_BARCODE_TYPE = "SCAN_BARCODE_TYPE"
    const val DEFAULT_DATA_FORMAT_FIELD_BARCODE_TYPE_NAME = "SCAN_BARCODE_TYPE_NAME"
    const val DEFAULT_DATA_FORMAT_FIELD_ASSIGNOR = "="
    const val DEFAULT_DATA_FORMAT_FIELD_SEPARATOR = "&"

    const val DEFAULT_ADD_DEVICE_LIMIT = 7
    const val DEFAULT_EXCEED_DEVICE_LIMIT_HANDLE = AppState.DELETE_AUTO
}